export class Demo {
    demoID: number;
    title: string;
    itemDesc: string;
    isPublic: boolean;
    demoType: string;
    createdTime: number;
    constructor(title: string) {

        this.demoID = 0;
        this.itemDesc = ''
        this.title = title
        this.isPublic = true
        this.demoType = '通知'
        this.createdTime = new Date().getTime()
    }
}

export class QuestionGroup {
    gid: number;
    groupType: string;
    title: string;
    total_score: number;
    pass_score: number;
    canBrushCount: number;
    useAll: boolean;
    isClosed: boolean;
    isPublic?: boolean;
    // main_kid: number;
    // q_tag: string;
    // q_short_body: string;
    user_id: number
    canStartTime: any;
    closedTime: any;
    limitMinutes: any;
    constructor(groupType: string) {

        this.gid = 0;
        this.user_id = 0;
        this.useAll = true
        this.isClosed = false;
        this.total_score = 100;
        this.pass_score = 60;
        this.title = ''
        this.canBrushCount = 1 //默认只允许刷一次
        if (groupType)
            this.groupType = groupType
        else
            this.groupType = '刷题'
    }

}
export class Job {
    session_id: number;
    userID: number;
    score: number;
    begin_time: Date;
    end_time: Date;
    lastUpdatedTime: Date;
    sub_scores: SubScore[];
    constructor() {
        this.session_id = 0;
        this.userID = 0;
        this.score = 0;
        this.begin_time = new Date()
        this.end_time = new Date()
        this.lastUpdatedTime = new Date() //都是设置当前时间吗？
        this.sub_scores = []
    }
}
export interface SubScore {

    qid: number;
    stuAnswer: string;

}
